import { UPDATE_MODEL_EVENT } from '@jctech/constants/event';
import { controlProps } from '@jctech/components/common/props';
import { propTypes } from '@jctech/utils/propTypes';

export const datepickerProps = {
  ...controlProps,
  modelValue: {
    type: String,
    default: undefined
  },
  isSourceDate: propTypes.bool.def(false),
  type: propTypes.oneOf(['date', 'time', 'datetime']).def('date'),
  format: propTypes.string.def('YYYY-MM-DD'),
  placeholder: propTypes.string.def('请选择日期')
};

export const datepickerEmits = [UPDATE_MODEL_EVENT];
